As disclosed in, for example, Japanese Patent Laid-Open No. 2011-256725, an ignition timing control device for an internal combustion engine which is capable of ignition timing control for knock avoidance has been known. Such an ignition timing control device can detect the generation status of knocking with a knock sensor and execute knock control that performs feedback correction on ignition timing according to a result of the detection.
In the knock control, controlled variables (knock controlled variables) are set such that ignition timing is retarded when the frequency of occurrence of knocking is high and is advanced when the frequency of occurrence of knocking is low. Occurrence of knocking is reduced by setting a control target value for ignition timing on the basis of the knock controlled variables.
A steady-state deviation of a knock controlled variable from a reference value is learned as a knock learning value. In the technique of the above-described publication, a reference value concerned is set at 0, and a steady component of a knock controlled variable is diverted to use as a knock learning value.